Skip to content

fix: module-scoped data-dir to avoid loading stale monorepo index#51

Merged
aviadshiber merged 1 commit intomainfrom
fix/module-scoped-data-dir
Apr 12, 2026
Merged

fix: module-scoped data-dir to avoid loading stale monorepo index#51
aviadshiber merged 1 commit intomainfrom
fix/module-scoped-data-dir

Conversation

@aviadshiber
Copy link
Copy Markdown
Owner

Summary

  • Use module URI (not workspace root) for jdtls data-dir hash when module-scoped
  • Prevents loading 2.5GB stale monorepo index when only one module is needed
  • Each module gets its own small data-dir (~10-50MB), enabling fast cold starts

Context

PR #50 removed eager workspace expansion but jdtls initialize still timed out at 120s because the data-dir was shared across all sessions. The products monorepo data-dir had grown to 2.5GB from previous full-workspace sessions. Even scoped to one module, jdtls loaded the entire cached state.

Test plan

  • All 361 tests pass
  • Pre-commit checks pass (lint, format, type check, coverage 84%)
  • Manual: open Java file from products repo, verify initialize completes in <15s
  • Manual: verify hover/definition on third-party types works

🤖 Generated with Claude Code

When jdtls starts scoped to a single module, use the module URI for the
data-dir hash instead of the workspace root. This prevents loading a
2.5GB cached index from previous full-workspace sessions, which caused
the initialize request to time out at 120s.

Each module now gets its own small data-dir (~10-50MB), enabling fast
cold starts (~10s) for on-demand module loading.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aviadshiber aviadshiber force-pushed the fix/module-scoped-data-dir branch from c46d077 to d2ef0d7 Compare April 12, 2026 07:22
@aviadshiber aviadshiber merged commit 782804c into main Apr 12, 2026
14 checks passed
@aviadshiber aviadshiber deleted the fix/module-scoped-data-dir branch April 12, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants